$(function () {
    let id = localStorage.getItem("userId");
    let data = myAjax("/findUserById", {id, id}, 'get');
    console.log(data);
    setData(data[0].object);
});

function setData(data) {
    $("#userId").val(data.id);
    $("#username").val(data.username);
    $("#password").val(data.password);
}

function updateUser() {
    let data = {id: $("#userId").val(), username: $("#username").val(), password: $("#password").val()};
    myAjax("/updateUser", data, 'post');
    $('#homeright').load('/back/usermanage.jsp');
}